Skip to content

Add CI workflow with sccache integration test#2

Merged
lukekim merged 14 commits into
trunkfrom
feat/ci-setup
Mar 30, 2026
Merged

Add CI workflow with sccache integration test#2
lukekim merged 14 commits into
trunkfrom
feat/ci-setup

Conversation

@lukekim
Copy link
Copy Markdown
Contributor

@lukekim lukekim commented Mar 30, 2026

Summary

  • CI triggers on pull_request only
  • Full lint pipeline: cargo fmt --check, cargo check, cargo clippy, rustdoc
  • Unit tests via cargo test
  • sccache integration test via ./scripts/test-sccache.sh (AWS CLI S3 API tests + cold/warm build cache verification)
  • Builds release binary and uploads as artifact
  • Uses UNAS_SMB_PASS secret, hardcoded us-west-1 region, spiceio bucket, ai_platform_dev share, runner user

Test plan

  • CI runs on PR creation and passes all steps
  • sccache integration test connects to NAS and achieves cache hits

- Trigger on pull_request only (not push)
- Rename binary references spio → spiceio
- Add full lint pipeline: fmt, check, clippy, rustdoc
- Add sccache integration test step with UNAS SMB credentials
- Hardcode us-west-1 region, spiceio bucket, ai_platform_dev share
- Upload release artifact as spiceio
Copilot AI review requested due to automatic review settings March 30, 2026 18:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions CI workflow for Rust that runs formatting/linting/docs checks, unit tests, an sccache integration script, and uploads a release binary artifact.

Changes:

  • Introduces a PR-triggered CI workflow with cargo fmt, cargo check, cargo clippy, and cargo doc gates.
  • Runs cargo test plus an sccache/AWS CLI integration test via ./scripts/test-sccache.sh.
  • Builds spiceio in release mode and uploads it as a workflow artifact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
lukekim added 2 commits March 30, 2026 12:02
- Remove workflow_dispatch trigger (PR-only)
- Add comment explaining self-hosted runner requirement
- Use repository variables with defaults for SMB config
- Skip integration test on fork PRs (secret unavailable)
- Assert cache hits > 0 and write errors == 0 in test script
Builds an optimized release binary on the self-hosted macOS runner,
packages it as a tarball with SHA-256 checksum, and uploads both as
release assets.
Copilot AI review requested due to automatic review settings March 30, 2026 19:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/test-sccache.sh Outdated
Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
lukekim added 2 commits March 30, 2026 12:08
Composite action that downloads a released spiceio binary, adds it
to PATH, and starts the S3-to-SMB proxy in the background.

Usage from another repo:
  - uses: spiceai/spiceio/.github/actions/setup@trunk
    with:
      smb-server: 192.168.3.148
      smb-user: runner
      smb-pass: ${{ secrets.UNAS_SMB_PASS }}
      smb-share: ai_platform_dev

Outputs the endpoint URL and PID for use in subsequent steps.
- Fix grep|awk pipelines in test script to not fail under set -e
- Add --clobber to gh release upload for safe re-runs
- Skip CI on fork PRs to protect self-hosted runner from untrusted code
Copilot AI review requested due to automatic review settings March 30, 2026 19:11
@lukekim lukekim self-assigned this Mar 30, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/actions/setup/action.yml Outdated
Comment thread .github/actions/setup/action.yml Outdated
Comment thread .github/workflows/release.yml
Comment thread .github/actions/setup/action.yml
lukekim added 2 commits March 30, 2026 12:18
- Make token input required (expression defaults don't evaluate in action metadata)
- Use RUNNER_OS/RUNNER_ARCH to match release asset naming convention
- Add cleanup step (if: always) to kill backgrounded spiceio process
Copilot AI review requested due to automatic review settings March 30, 2026 19:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/test-sccache.sh
Comment thread .github/actions/setup/action.yml Outdated
Comment thread .github/actions/setup/action.yml
lukekim added 2 commits March 30, 2026 12:27
- Zero sccache stats before warm build so assertion is warm-only
- Verify SHA-256 checksum after downloading release asset
- Remove uname fallbacks (RUNNER_OS/RUNNER_ARCH always set in Actions)
- Fix CI: use env.SPICEIO_SMB_PASS instead of secrets context in if condition
Copilot AI review requested due to automatic review settings March 30, 2026 19:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
lukekim added 2 commits March 30, 2026 12:33
- Fix rustdoc: escape brackets in der_wrap doc comment
- Fix integration test skip: check secret via env step, not secrets context
- Simplify setup action: accept smb://user:pass@server/share URL
  instead of separate inputs for each field
- smb-pass input overrides URL password (for secrets)
Copilot AI review requested due to automatic review settings March 30, 2026 19:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/actions/setup/action.yml
Comment thread .github/actions/setup/action.yml
Comment thread .github/workflows/release.yml
- Install awscli via brew if missing on self-hosted runner
- Fix SMB URL parsing for smb://user@server/share (no password in URL)
- Check spiceio server header for skip detection, not just any HTTP response
@lukekim lukekim merged commit e989c6c into trunk Mar 30, 2026
3 checks passed
@lukekim lukekim deleted the feat/ci-setup branch March 30, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants